package com.xr.hr.care;

import com.bstek.dorado.common.*;
import com.bstek.dorado.data.*;
import com.bstek.dorado.data.db.DBStatement;
import com.bstek.dorado.view.*;
import com.bstek.dorado.view.data.*;
import com.bstek.dorado.view.control.*;

/**
 * batchCareViewModel
 */
public class batchCareViewModel extends DefaultViewModel {
  protected void doUpdateData(ParameterSet parameters, ParameterSet outParameters)
      throws Exception {
    // Add your code here
    super.doUpdateData(parameters, outParameters);
  }
  public void careDr(ParameterSet parameters, ParameterSet outParameters)
  throws Exception {
	  DBStatement dbs = new DBStatement();
	  Dataset dsCare = getDataset("datasetCare");
	  while(!dsCare.isLast()){
		  dbs.setSql("delete from emp_care where EMP_CARE_ID="+dsCare.getString("EMP_CARE_ID"));
		  dbs.execute();
		  dsCare.moveNext();
	  }
	
	  dbs.close(); 
}
  public void careModify(ParameterSet parameters, ParameterSet outParameters)
  throws Exception {
	  DBStatement dbs = new DBStatement();
	  Dataset dsCare = getDataset("datasetCare");
	  com.xr.common.CommUtil.dbsUpdateData(dbs, dsCare, "emp_care", "EMP_CARE_ID");
	  dbs.close();
  }
  
}
